{% extends 'rbac/layout.html' %}

{% block content %}

    <!--角色展示start-->
    <div class="bs-example" data-example-id="hoverable-table">
        <div><a href="{% url 'roles_add' %}" class="btn btn-default">添加角色</a></div>
        <table class="table table-hover">
            <thead>
            <tr>
                <th>ID</th>
                <th>角色名称</th>
                <th>选项</th>
            </tr>
            </thead>
            <tbody>
            {% for field in roles_obj %}
                <tr>
                    <th scope="row">#{{ field.id }}</th>
                    <td>{{ field.title }}</td>
                    <td><a href="{% url 'roles_edit' roles_id=field.id %}"><i class="fa fa-pencil-square-o"
                                                                              aria-hidden="true"></i>编辑</a>
                        <a href="{% url 'roles_del' roles_id=field.id %}"><i class="fa fa-trash-o"
                                                                             aria-hidden="true"></i>删除</a></td>
                </tr>
            {% endfor %}


            </tbody>
        </table>
    </div>
    <!--角色展示end-->
{% endblock %}
